package com.alifi.crm.dal.lottery;

import org.springframework.stereotype.Repository;

import com.alifi.crm.dal.IbatisCRUDDAO;
import com.alifi.crm.dal.object.PrizeDO;

@Repository("prizeDAO")
public class PrizeDAOImpl extends IbatisCRUDDAO<PrizeDO> implements PrizeDAO {

    @Override
    protected String getNamespace() {
        return "act_prize";
    }

    @Override
    public PrizeDO getPrizeByType(String prizeType) {
        return (PrizeDO)this.getSqlMapClientTemplate().queryForObject(this.genStmt("getPrizeByType"), prizeType);
    }

    @Override
    public void updatePrizeCount(String prizeType) {
        this.getSqlMapClientTemplate().update(this.genStmt("updatePrizeCount"), prizeType);
    }
    
}
